package com.ydj;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.scheduling.annotation.EnableScheduling;

@EnableScheduling
@EntityScan({"com.ydj.**.entity"})
@MapperScan({"com.ydj.**.mapper"})
@SpringBootApplication(scanBasePackages = "com.ydj")
public class SyncApplication extends SpringBootServletInitializer {
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(SyncApplication.class);
    }

    public static void main(String[] args) {
        // 如果需要用抓包工具，才设置这里
//        System.setProperty("http.proxyHost", "127.0.0.1");
//        System.setProperty("http.proxyPort", "8848");

        SpringApplication.run(SyncApplication.class, args);
    }
}